//
//  CWCImageCell.m
//  ChuanNews
//
//  Created by dllo on 16/4/23.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "CWCImageCell.h"
#import "BaseHeader.h"
@implementation CWCImageCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.titleLabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.titleLabel];
        
        self.imgView = [[UIImageView alloc]init];
        [self.contentView addSubview:self.imgView];
        
        self.imgView1 = [[UIImageView alloc]init];
        [self.contentView addSubview:self.imgView1];
        self.imgView2 = [[UIImageView alloc]init];
        [self.contentView addSubview:self.imgView2];
        
        [self jxl_setDayMode:^(UIView *view) {
            CWCImageCell *cell = (CWCImageCell *)view;
            cell.backgroundColor = [UIColor whiteColor];
            cell.contentView.backgroundColor = [UIColor whiteColor];
            cell.titleLabel.backgroundColor = [UIColor whiteColor];
            cell.titleLabel.textColor = [UIColor blackColor];
        } nightMode:^(UIView *view) {
            CWCImageCell *cell = (CWCImageCell *)view;
            cell.backgroundColor = [UIColor blackColor];
            cell.contentView.backgroundColor = [UIColor blackColor];
            cell.titleLabel.backgroundColor = [UIColor blackColor];
            cell.titleLabel.textColor = [UIColor whiteColor];

        }];
    }
    return self;
}

-(void)layoutSubviews{
    [super layoutSubviews];
    self.titleLabel.frame = CGRectMake(10, 0, 355, 20);
    self.imgView.frame = CGRectMake(10, 25, (WIDTH - 30) / 3, 90);
    self.imgView1.frame = CGRectMake(((WIDTH - 30) / 3) + 15, 25, (WIDTH - 30) / 3, 90);
    self.imgView2.frame = CGRectMake(((WIDTH - 30) / 3) * 2 + 20, 25, (WIDTH - 30) / 3, 90);
    
}







/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
